package com.atde._03_creational_design_patterns.fcatory.mydemo.demo01;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._03_creational_design_patterns.fcatory.mydemo.demo01
 * @Author: Del
 * @CreateTime: 2025-06-03  08:31
 * @Description: 简单工厂模式 ---  除法运算类
 * @Version: 1.0
 */
public class Div extends  Operation{
     public double getResult(double numberA ,double numberB) {
         if (numberB == 0) {
             System.out.println("除数不能为0");
             throw new ArithmeticException();
         }
        return numberA / numberB;
    }
}
